package com.example.springboot01.test;

import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * TODO
 *
 * @author chenke
 * @version 1.0
 * @date 2022/7/27 11:00
 */
public class MyApplicationContextInitializer implements ApplicationContextInitializer {
    @Override
    public void initialize(ConfigurableApplicationContext applicationContext) {
        // 增加监听
        // 用户可以在整个spring容器还没被初始化之前做一些事情
        System.out.println("此处可以增加监听");
    }
}
